package com.sora.sora.security;

import com.sora.sora.common.model.entity.AuthenticationEntity;
import com.sora.sora.common.model.entity.UserEntity;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;

public class UserDetail extends User {

    private AuthenticationEntity userEntity;

    public UserDetail(AuthenticationEntity userEntity, Collection<? extends GrantedAuthority> authorities) {
        super(userEntity.getName(), userEntity.getPassword(), authorities);
        this.userEntity = userEntity;
    }
}
